package com.financial.service.heemoney.convertor;

import com.financial.service.heemoney.dto.HeemoneyConfigDTO;
import com.financial.service.heemoney.dto.businsess.HeemoneyPaySplitBusinessDTO;
import com.financial.service.heemoney.dto.commmon.HeemoneyPaySplitCommonDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneyPaySplitInParamDTO;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @api {post}
 * @apiExample author zhaopengjun
 * tar 汇收银分账账户注册公共参数转换实体
 * date   2020/3/19 7:49
 * @apiGroup
 * @apiVersion 1.0.0
 * @apiHeader
 * @apiParam
 * @apiSuccess
 */
public interface HeemoneyPaySplitConvert {
    HeemoneyPaySplitConvert MAPPER = Mappers.getMapper(HeemoneyPaySplitConvert.class);

    @Mapping(target = "method", source = "heemoneyConfigDTO.heemoneyPaySplit.method")
    HeemoneyPaySplitCommonDTO configDTOConvertCommonDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyPaySplitInParamDTO heemoneyPaySplitInParamDTO);

    @Mapping(target = "notify_url",source ="heemoneyConfigDTO.heemoneyPaySplit.notify_url")
    HeemoneyPaySplitBusinessDTO configDTOConvertBusinessDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyPaySplitInParamDTO heemoneyPaySplitInParamDTO);
}
